# -*- conding: utf-8 -*-
import sys, pygame
from random import randrange
from pygame.locals import KEYDOWN , QUIT
from itertools import count

size = width, height = 480, 480

pygame.init()
screen = pygame.display.set_mode(size)

snake = [pygame.Rect(10, 10 + value * 10, 10, 10) for value in range(10)]
foreground, background = (255, 255, 255), (0, 0, 0)

for counter in count():

    event = pygame.event.poll()

    if event.type == QUIT:
        pygame.quit()
        sys.exit()

    screen.fill(background)
    for rect in snake:
        pygame.draw.rect(screen, foreground, rect)

    pygame.display.flip()
